#!/bin/bash

echo_full_line() {
    local char="${1:-=}"  # 默认使用 = ，你也可以传入其他字符比如 - * 等
    printf '%*s\n' "$(tput cols)" | tr ' ' "$char"
}

echo_full_line
echo " 更新软件包索引"
echo_full_line

sudo apt update

echo_full_line
echo "安装c/c++ 工具库 & 调试工具"
echo_full_line

sudo apt install -y \
    cmake \
    gcc \
    g++ \
    make \
    libncurses5-dev \
    libssl-dev \
    bison \
    libaio-dev \
    libtinfo-dev \
    zlib1g-dev \
    pkg-config

sudo apt install -y \
    gdb \
    valgrind \
    strace \
    ltrace